import React, { Suspense } from 'react'
import ReactDOM from 'react-dom/client'
import { HashRouter } from 'react-router-dom'
import { Provider }  from 'react-redux'
import { ThemeProvider, createTheme } from '@mui/material/styles'

import App from '@/App'
import "normalize.css"
import "./assets/css/index.less"
import store from './store'
import theme from './assets/theme'

const materialTheme = createTheme(theme)

const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(
  <Suspense fallback="loading">
    <HashRouter>
      <Provider store={store}>
        <ThemeProvider theme={materialTheme}>
          <App />
        </ThemeProvider>
      </Provider>
    </HashRouter>
  </Suspense>
)